from django.db import models

# Create your models here.


class Goodsmodel(models.Model):
    model_name= models.CharField(max_length=20,verbose_name='品牌名')



class Goods(models.Model):
    goods_name = models.CharField(max_length=30,verbose_name='商品名')
    goods_price = models.FloatField(verbose_name='商品价格')
    goods_detail = models.CharField(max_length=100,verbose_name='描述')
    goods_img = models.ImageField(upload_to='static/',verbose_name='商品图片')
    model = models.ForeignKey(Goodsmodel, on_delete=models.CASCADE, verbose_name='品牌')



class Gooddetail(models.Model):
    convent = models.TextField(verbose_name='评论')
    image = models.ImageField(upload_to='static/',verbose_name='实拍图片')
    parament = models.ImageField(upload_to='static/',verbose_name='参数')
    goods = models.ForeignKey(Goods,on_delete=models.CASCADE)

